home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Source Code / C / System / Felix 1.1 / cdev.h < prev    next >
Encoding:
C/C++ Source or Header  |  1991-06-21  |  1.3 KB  |  47 lines  |  [TEXT/KAHL]

  1.  
  2. /*
  3.  *  cdev.h - standard cdev object
  4.  *
  5.  *  Copyright (c) 1991 Symantec Corporation.  All rights reserved.
  6.  *
  7.  */
  8.  
  9. #pragma once
  10.  
  11. struct cdev : indirect {
  12.  
  13.         /*  instance variables  */
  14.         
  15.     WindowPeek        dp;                /*  the Control Panel  */
  16.     short            refnum;            /*  refnum of Control Panel DA  */
  17.     short            rsrcID;            /*  base resource ID  */
  18.     short            lastItem;        /*  # of last Control Panel item  */
  19.     EventRecord        *event;            /*  ==> last event  */
  20.     long            status;            /*  value to be returned  */
  21.     
  22.         /*  methods  */
  23.         
  24.     long            Message(short, short);    /*  dispatch message  */
  25.     void            Error(long);        /*  set error return  */
  26.     void            Init(void);            /*  "initDev"  */
  27.     void            Close(void);        /*  "closeDev"  */
  28.     void            Activate(void);        /*  "activDev"  */
  29.     void            Update(void);        /*  "updateDev"  */
  30.     void            Idle(void);            /*  "nulDev"  */
  31.     void            ItemHit(short);        /*  "hitDev"  */
  32.     void            Key(short);            /*  "keyEvtDev"  */
  33.     void            CmdKey(short);        /*  "keyEvtDev" (command)  */
  34.     void            Deactivate(void);    /*  "deactiveDev"  */
  35.     void            Undo(void);            /*  "undoDev"  */
  36.     void            Cut(void);            /*  "cutDev"  */
  37.     void            Copy(void);            /*  "copyDev"  */
  38.     void            Paste(void);        /*  "pasteDev"  */
  39.     void            Clear(void);        /*  "clearDev"  */
  40. };
  41.  
  42.  
  43. /*  each cdev must implement these  */
  44.  
  45. Boolean Runnable(void);            /*  "macDev"  */
  46. cdev *New(void);                /*  new(cdev)  */
  47.